<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			/*当选中某一个爱好，触发了css的状态选择器，利用关系选择符给下一个标签添加颜色*/
			input[name="love[]"] + label {
				color:blue;
			}
		</style>
	</head>

	<body>
		<input type="checkbox" name="love[]" id="book" value="book">
		<label for="book">书</label><br>
		<input type="checkbox" name="love[]" id="music" value="music">
		<label for="music">音乐</label><br>
		<input type="checkbox" name="love[]" id="movie" value="movie">
		<label for=“movie”>电影</label><br>

	</body>

</html>